Fast Monte Carlo Algorithms for Matrices I: Approximating Matrix Multiplication
نویسندگان
چکیده
Motivated by applications in which the data may be formulated as a matrix, we consider algorithms for several common linear algebra problems. These algorithms make more efficient use of computational resources, such as the computation time, random access memory (RAM), and the number of passes over the data, than do previously known algorithms for these problems. In this paper, we devise two algorithms for the matrix multiplication problem. Suppose A and B (which are m × n and n × p, respectively) are the two input matrices. In our main algorithm, we perform c independent trials, where in each trial we randomly sample an element of {1, 2, . . . , n} with an appropriate probability distribution P on {1, 2, . . . , n}. We form an m × c matrix C consisting of the sampled columns of A, each scaled appropriately, and we form a c × n matrix R using the corresponding rows of B, again scaled appropriately. The choice of P and the column and row scaling are crucial features of the algorithm. When these are chosen judiciously, we show that CR is a good approximation to AB. More precisely, we show that ‖AB − CR‖F = O(‖A‖F ‖B‖F / √ c), where ‖·‖F denotes the Frobenius norm, i.e., ‖A‖F = ∑ i,j Aij . This algorithm can be implemented without storing the matrices A and B in RAM, provided it can make two passes over the matrices stored in external memory and use O(c(m+n+p)) additional RAM to construct C and R. We then present a second matrix multiplication algorithm which is similar in spirit to our main algorithm. In addition, we present a model (the pass-efficient model) in which the efficiency of these and other approximate matrix algorithms may be studied and which we argue is well suited to many applications involving massive data sets. In this model, the scarce computational resources are the number of passes over the data and the additional space and time required by the algorithm. The input matrices may be presented in any order of the entries (and not just row or column order), as is the case in many applications where, e.g., the data has been written in by multiple agents. In addition, the input matrices may be presented in a sparse representation, where only the nonzero entries are written.
منابع مشابه
A Simplified Proof For The Application Of Freivalds' Technique to Verify Matrix Multiplication
Fingerprinting is a well known technique, which is often used in designing Monte Carlo algorithms for verifying identities involving matrices, integers and polynomials. The book by Motwani and Raghavan [1] shows how this technique can be applied to check the correctness of matrix multiplication – check if AB = C where A,B and C are three n×n matrices. The result is a Monte Carlo algorithm runni...
متن کاملFast Output-Sensitive Matrix Multiplication
3 We consider the problem of multiplying two U×U matrices A and C of elements from a field F. We present a new randomized algorithm that can use the known fast square matrix multiplication algorithms to perform fewer arithmetic operations than the current state of the art for output matrices that are sparse. In particular, let ω be the best known constant such that two dense U×U matrices can be...
متن کاملEvaluating Performance of Algorithms in Lung IMRT: A Comparison of Monte Carlo, Pencil Beam, Superposition, Fast Superposition and Convolution Algorithms
Background: Inclusion of inhomogeneity corrections in intensity modulated small fields always makes conformal irradiation of lung tumor very complicated in accurate dose delivery.Objective: In the present study, the performance of five algorithms via Monte Carlo, Pencil Beam, Convolution, Fast Superposition and Superposition were evaluated in lung cancer Intensity Modulated Radiotherapy plannin...
متن کاملMonte Carlo Simulation of Multiplication Factor in PIN In0.52Al0.48As Avalanche Photodiodes
In this paper, we calculate electron and hole impactionization coefficients in In0.52Al0.48As using a Monte Carlo modelwhich has two valleys and two bands for electrons and holesrespectively. Also, we calculate multiplication factor for electronand hole initiated multiplication regimes and breakdown voltagein In0.52Al0.48As PIN avalanche photodiodes. To validate themodel, we compare our simulat...
متن کاملRandom path method with pivoting for computing permanents of matrices
The permanent of matrix is important in mathematics and applications. Its computation, however, is #P-complete. Randomized algorithms are natural consideration to deal with such kind of problems. A Monte Carlo algorithm for approximating permanents of matrices is proposed in this paper, which improves a method by Rasmussen. Mathematical analysis and numerical computations show the efficiency of...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- SIAM J. Comput.
دوره 36 شماره
صفحات -
تاریخ انتشار 2006